package club.hiuit.share.kuaidi100.entity;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Slf4j
@Data
@ConfigurationProperties(prefix = "kuaidi100")
public class KuaidiProperties {

    private String appid;

    private String appsecret;

    private long timestamp;

    private boolean errorSign;

    public long getTimestamp(boolean b) {
        if ( !b ) {
            this.timestamp = System.currentTimeMillis();
        }
        return timestamp;
    }

    public long getTimestamp() {
        this.timestamp = System.currentTimeMillis();
        return timestamp;
    }

}
